fix: allow development versions to use caret#356
Merged
hugomrdias merged 1 commit intomasterfrom May 3, 2019
Merged
Conversation
d4ec946 to
ad268ef
Compare
alanshaw
approved these changes
Apr 29, 2019
Member
alanshaw
left a comment
There was a problem hiding this comment.
LGTM - just a minor suggestion
Member
|
why not just remove all that logic and default to what npm does ? |
Member
Author
|
@hugomrdias I guess because npm would ping specific version (and not ranges) for 0.0.x versions. If you use |
In npm caret (^) and tilde (~) have the same meaning for versions 1.0.0 < x <= 0.1.0. Hence we can allow carat to be used for such versions. If you run `npm install <some-packages>` it automatically uses caret for such versions. Hence you would need to manually update your package.json to make it pass out linting. With this change that's no longer needed. Fixes #346.
22f35b6 to
7ec4b52
Compare
Member
|
Npm uses ^ as the default save-prefix which does basically the same as the logic we have now |
Member
Author
|
Nope: $ echo '{}' > package.json
$ npm install brotli-size
…
$ cat package.json
{
"dependencies": {
"brotli-size": "0.0.3"
}
} |
Member
|
Sneaky bastards 🙃 but that actually doesn't seem that bad, packages in 0.0.x are kinda random with semver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In npm caret (^) and tilde (~) have the same meaning for versions
1.0.0 < x <= 0.1.0. Hence we can allow carat to be used for such
versions.
If you run
npm install <some-packages>it automatically usescaret for such versions. Hence you would need to manually update
your package.json to make it pass out linting. With this change
that's no longer needed.
Fixes #346.